home *** CD-ROM | disk | FTP | other *** search
/ Greatest Childrens Stories Ever Told / Greatest_Stories.iso / demos / funtown / demo.dir / 00050_Script_Scripts 7 < prev    next >
Text File  |  1994-11-08  |  3KB  |  84 lines

  1. --òòò Scripts 5
  2. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  3. on go1 whichFrame, whichTextPict, whichMethod
  4.   if the frame>=label ( "map" ) then
  5.     if the frame<=label ( "map" ) +4 then
  6.       exit
  7.     end if
  8.   end if
  9.   global WQ, mode, MS, ML, CV, dontPassIt
  10.   if dontPassIt=1 then
  11.     set dontPassIt=0
  12.     exit
  13.   end if
  14.   if voidP ( whichTextPict ) then set whichTextPict=char 1 to ( the number of chars in whichFrame -1 ) of whichFrame
  15.   if mode=2 then activateChalkboard whichFrame, whichTextPict,"òLearnò"
  16.   else if mode>2 and mode<10 then checkResponse the clickOn, whichFrame, whichTextPict, whichMethod
  17. end
  18. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  19. on goback
  20.   global CV
  21.   sound stop 1
  22.   sound stop 2
  23.   puppetTransition 0
  24.   go frame ("pos"& CV)
  25. end
  26. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  27. on checkResponse whichSprite, whichFrame, whichTextPict, whichMethod
  28.   if the frame>=label ( "map" ) then
  29.     if the frame<=label ( "map" ) +4 then
  30.       exit
  31.     end if
  32.   end if
  33.   global QL, WQ, availableQuestions, mode, MS, CV, ML, QC, NQ, NS, DL
  34.   global NQ, QA,SameSound, CU
  35.   if CU then exit
  36.   if voidP(SameSound) then set SameSound=1
  37.   if whichSprite=1 then exit 
  38.   set x=the ink of sprite ( whichSprite )
  39.   if x=0 or x=8 then set the ink of sprite ( whichSprite )=4 
  40.   else set the ink of sprite ( whichSprite )=37 
  41.   updateStage
  42.   startTimer
  43.   repeat while the timer<2 or the stillDown
  44.     do ( "nothing" )
  45.   end repeat
  46.   doSound "DooDooDoo"
  47.   if MS="Find" or MS="Match" then
  48.     set the locV of sprite 44=-abs ( the locV of sprite 44 )
  49.     showPatchOther the locH of sprite 1, the locV of sprite 1, 23, 0
  50.   end if
  51.   updateStage
  52.   if mode < 5 then
  53.     repeat with x = 1 to 20
  54.       if char x of  (the name of Cast ( the CastNum of Sprite 43)) = "ò" then
  55.         set theNum = (x-1)
  56.         exit repeat
  57.       end if
  58.     end repeat 
  59.     doSound (char 1 to theNum of (the name of Cast ( the CastNum of Sprite 43)))
  60.   end if
  61.   put "Question "& WQ& " answered!"
  62.   do ( "global WQ"  )
  63.   if QA < 0 then set QA = 1
  64.   else set QA= (QA + 1)
  65.   put the name of Cast ( the CastNum of Sprite whichSprite ) into item QA of DL
  66.   if  WQ >=NQ then 
  67.     reposition (CV)
  68.     weHaveAWinner
  69.   else
  70.     set WQ=WQ+1
  71.     reposition (CV)
  72.   end if
  73. end
  74. -- ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
  75. on CheckNumbers
  76.   global TCN, mode
  77.   if mode = 3 then put the number of lines of field "Find Questions" into TCN
  78.   else if mode = 4 then put the number of lines of field "Match Questions" into TCN
  79.   else if mode = 5 then put the number of lines of field "Read Questions" into TCN
  80. end
  81.  
  82.  
  83.  
  84.